<?php //var_dump($data); echo $_GET['ma'];?>
<form name = "frm_updateKhachHang" method = "post" action = "">
<table width = "580" cellpadding = "2" cellspacing = "2" border = "0" align = "center" bgcolor = "#D4D0C8">
<tr> <th colspan = "2"  class = "list">CẬP NHẬT CHI TIẾT HÓA ĐƠN</th> </tr>
<tr> 
	<td width = "200" valign = "top"> <div align = "right">Mặt Hàng</div> </td>
	<td width = "200" valign = "top" align = "left">
		<select name = "cmb_MatHang">
		<?php if(is_array($data[listmh])){
				foreach ($data['listmh'] as $item){
		?>
				<option value = "<?php echo $item['MaMH'];?>"
				<?php 
					if($data['MaMH'] == $item['MaMH']){
						echo 'selected';
					}
				?>>
				<?php echo $item['TenMH'];?>
				</option>
		<?php }
		}
		?>
		</select>
	</td>
</tr>
<tr> 
	<td width = "200" valign = "top"> <div align = "right">Nguoi Lap </div> </td>
	<td width = "200" valign = "top" align = "left">
		<select name = "cmb_HoaDon">
		<?php if(is_array($data['listhd'])){
				foreach ($data['listhd'] as $item){
		?>
				<option value = "<?php echo $item['MaHD'];?>"
				<?php 
					if($data['MaHD'] == $item['MaHD']){
						echo 'selected';
					}
				?>>
				<?php echo $item['NguoiLap'];?>
				</option>
		<?php }
		}
		?>
		</select>
	</td>
</tr>
<tr> 
	<td width = "200" valign = "top"> <div align = "right">Ngày Lập</div> </td>
	<td width = "200" valign = "top" align = "left">
				<select name = "cmb_HoaDon">
		<?php if(is_array($data['listhd'])){
				foreach ($data['listhd'] as $item){
		?>
				<option value = "<?php echo $item['MaHD'];?>"
				<?php 
					if($data['MaHD'] == $item['MaHD']){
						echo 'selected';
					}
				?>>
				<?php echo $item['NgayLap'];?>
				</option>
		<?php }
		}
		?>
		</select>
	</td>
</tr>
<tr> 
	<td valign = "top"> <div align = "right"> Số Lượng</div> </td>
	<td valign = "top">
		<input name = "SoLuong" type = "text" value = "<?php echo $data['SoLuongBan'];?>"/></td>
</tr>
<tr> 
	<td width = "200" valign = "top"> <div align = "right"> Don Gia </div> </td>
	<td width = "200" valign = "top">
		<input name = "DonGia" type = "text" value = "<?php echo $data['DonGiaBan'];?>"/> </td>
</tr>
<tr>
	<td width = "400" valign = "top" colspan = "2"> <div> <input name = "btok" type = "submit" value = "Cap Nhat"/> </div> </td>
</tr>
</table>
</form>